<?php

//$page = isset($_POST['page']) ? intval($_POST['page']) : 1;
//$rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
//$offset = ($page - 1) * $rows;
$result = array();

include 'inc/conn.php';

//$rs = mysql_query("select * from ats_allcity");
$rs = mysql_query("select distinct cityname as id, cityname as city from ats_partners order by cityname");

$items = array();
while ($row = mysql_fetch_object($rs)) {
    array_push($items, $row);
}
$result = $items;

echo json_encode($result);
//echo $result;

?>